{extends file="assets::smarty-templates::Master"|ToPath}
{block name="content"}
{html_css file="whiteLabel/light/jquery.datatables.css"}
{html_css file="tooltip/coda.css"}

<h1>Solicitudes de Cursos</h1>
<div style="overflow: hidden;">
    <a style="float: right" href="{$logout}" class="small btn icon i_exit">Cerrar Sesi&oacute;n</a>
</div>
<fieldset>
    <table class="datatable">
        <thead>
            <tr>
                <th>Docente</th>
                <th>Email</th>
                <th>Asignatura</th>
                <th>Codigo</th>
                <th>Programa</th>
                <th>Estado</th>
                <th>Fecha de Solicitud</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            {foreach $solicitudes as $solicitud}
                <tr>
                    <td>{$solicitud["docente"]}</td>
                    <td>{$solicitud["email"]}</td>
                    <td>{$solicitud["nombreCurso"]}</td>
                    <td>{$solicitud["codigoCurso"]}</td>
                    <td>{$solicitud["idPrograma"]}</td>
                    <td>{if $solicitud["estado"] == 1}Pendiente{else}Creado{/if}</td>
                    <td>{$solicitud["fechaCreacion"]}</td>
                    <td style="width: 100px;">
                        <a href="{$imprimir}&idSolicitud={$solicitud["id"]}" target="_blank" class="small btn onlyicon icon tooltip i_printer" title="Ver para Imprimir"></a>
                        {if $solicitud["estado"] == 1}<a href="{$confirmar}&idSolicitud={$solicitud["id"]}" class="small btn onlyicon icon tooltip i_tick" title="Confirmar Creaci&oacute;n"></a>{/if}
                        <a href="{$borrar}&idSolicitud={$solicitud["id"]}" class="small btn onlyicon icon tooltip i_trashcan" title="Eliminar Solicitud"></a>
                    </td>
                </tr>
            {/foreach}
        </tbody>
    </table>
</fieldset>
            
<script type="text/javascript">
    {literal}
        require(["WhiteLabel.datatables", "jQuery.ToolTip", "jquery"], function(jQuery){
            jQuery(document).ready(function($){
                $(".tooltip").tooltip({
                    track: true,
                    delay: 0,
                    fixPNG: true,
                    top: -5,
                    left: 30
                });
                /*
                    top: 15,
                    left: 10
                */ 
            });
        });
    {/literal}
</script>
{/block}